[Unit]
Description=AdminAPI
Requires=network-online.target
After=network-online.target

# Move this to the Service section if on systemd >=250
StartLimitIntervalSec=60
StartLimitBurst=10

[Service]
Type=simple
ExecStart=/opt/supabase-admin-api
User=adminapi
Restart=always
RestartSec=3
TimeoutStopSec=10
Environment="AWS_USE_DUALSTACK_ENDPOINT=true"
{% if qemu_mode is defined and qemu_mode %}
Environment="AWS_SDK_LOAD_CONFIG=true"
{% endif %}
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
